﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucCustomerEmailList.ascx.cs" Inherits="Modules_WebsiteBackEnd_wucCustomerEmailList" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:UpdatePanel ID="UpdatePanelList" runat="server">
    <ContentTemplate>   
        <table align="center" border="0" cellpadding="0" cellspacing="0" width="790px" class="TableGrayBorder">
            <tbody> 
            <tr height="30px">
                    <td align="center">
                        <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f0f2f4">
                            <tbody>
                                <tr height="30px">
                                    <td width="350px">
                                        &nbsp;
                                    </td>
                                    <td width="50px" valign="middle" align="right">
                                        ID &nbsp;
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtCusId" runat="server" Width="70px" Height="17px"></asp:TextBox>
                                    </td>
                                    <td width="120px" valign="middle" align="right">
                                        Tên khách hàng &nbsp;
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtCusName" runat="server" Width="150px" Height="17px"></asp:TextBox>
                                    </td>
                                    <td width="70px" valign="middle" align="right">
                                        Email &nbsp;
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEmail" runat="server" Width="150px" Height="17px"></asp:TextBox>
                                    </td>
                            </tbody>
                        </table>
                    </td>
                </tr>              
                <tr>
                    <td align="center">
                        <telerik:RadGrid ID="rgrdGridDataList" runat="server" Skin="WebBlue" Width="790px"
                            PageSize="20" AllowMultiRowSelection="true" AllowPaging="True" ShowGroupPanel="false"
                            AllowAutomaticDeletes=false AllowAutomaticInserts=false AllowAutomaticUpdates=false
                            BorderWidth="0px" GridLines="None" AutoGenerateColumns="false" 
                            OnPageIndexChanged="rgrdGridDataList_PageIndexChanged"
                            AllowSorting="false" OnItemCommand="rgrdGridDataList_ItemCommand">
                            <ClientSettings EnablePostBackOnRowClick="True">
                                <Selecting AllowRowSelect="True" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevAndNumeric" NextPagesToolTip="Trang sau" NextPageToolTip="Trang sau"
                                PagerTextFormat="Lựa chọn trang: {4} &amp;nbsp;Trang {0} / {1}, bản ghi {2} - {3} / {5}."
                                PrevPagesToolTip="Trang trước" PrevPageToolTip="Trang trước" />
                            <MasterTableView DataKeyNames="CustomerEmailId">
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Resizable="False" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                <EditFormSettings>
                                    <PopUpSettings ScrollBars="None" />
                                </EditFormSettings>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="CustomerEmailId" HeaderText="ID" ReadOnly="True"
                                        UniqueName="CustomerEmailId">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="50px"/>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CustomerName" HeaderText="T&#234;n khách hàng"
                                        UniqueName="CustomerName" ReadOnly=true>
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" Width="150px"/>
                                    </telerik:GridBoundColumn>                                    
                                    <telerik:GridBoundColumn DataField="CustomerEmail" HeaderText="Email" ReadOnly=true
                                        UniqueName="CustomerEmail">
                                         <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" Width="150px"/>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CustomerPhone" HeaderText="Điện thoại" UniqueName="CustomerPhone" ReadOnly=true>
                                     <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" Width="70px"/>
                                    </telerik:GridBoundColumn>
                                     <telerik:GridBoundColumn DataField="CustomerAddress" HeaderText="Địa chỉ" UniqueName="CustomerAddress" ReadOnly=true>
                                      <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" Width="150px"/>
                                    </telerik:GridBoundColumn>   
                                    <telerik:GridBoundColumn DataField="CustomerJob" HeaderText="Nghề nghiệp" UniqueName="CustomerJob" ReadOnly=true>
                                     <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Left" Width="70px"/>
                                    </telerik:GridBoundColumn>                                                                            
                                    <telerik:GridClientSelectColumn UniqueName="SelectRow" CommandName="RowClick">
                                        <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridClientSelectColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/editrow.png" UniqueName="ControlEdit" CommandName="RowEdit" Text="Sửa">
                                        <ItemStyle CssClass="MyImageButton"  HorizontalAlign="Center" Width="30px"/>
                                    </telerik:GridButtonColumn>                                    
                                    <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa bản ghi được lựa chọn?" ConfirmDialogType="RadWindow" 
                                        ConfirmTitle="X&#243;a bản ghi" ButtonType="ImageButton" CommandName="RowDelete" Text="X&#243;a" ImageUrl="~/Images/icons/recyclebin.png"
                                        UniqueName="ControlDelete">
                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="30px" />
                                    </telerik:GridButtonColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </tbody>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>